package com.rlyy.facade;

import com.rlyy.common.param.Request;
import com.rlyy.common.response.Result;
import com.rlyy.common.response.ResultUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * 添加用户
 *
 * @author yuanqinglong
 * @since 2021/9/18 14:09
 */
@Controller
public class UserAddFacade {


    /**
     * 用户添加
     *
     * @param grpcRequest grpc请求
     * @return {@link Result}
     */
    @RequestMapping("rbac_user_add")
    public Result userAdd(Request grpcRequest) {
        System.out.println("添加用户。。。");
        return ResultUtil.success();
    }

    static List<Object> list = new ArrayList(90000);
    public static void main(String[] args) {
        long l = System.currentTimeMillis();
        while (true){
            list.add(new Object());
            list.add(list);
            list.add(list);
            list.add(list);
            System.out.println(list.toString().length() +" : "+ list.size() + " : " + (System.currentTimeMillis() - l));
        }
    }
}
